﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Profiles.aspx.vb" Inherits="GamerZ.Profiles" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p style=" text-align: center; width: 100%;"> 
        <asp:Button ID="Button1" PostBackUrl="~/editProfile.aspx" runat="server" Text="Edit Profile" />
        </p>
<center>
    <p style=" text-align: center; width: 100%;">
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [User_ID], [FirstName], [LastName], [Images], [DateofBirth], [RegisterationDate], [Gender] FROM [UserProfile]">
        </asp:SqlDataSource>
        <asp:ListView ID="ListView1" runat="server" DataKeyNames="User_ID" DataSourceID="SqlDataSource1" GroupItemCount="4" style="width: 100%;">
                <AlternatingItemTemplate>
                    <td>
                        <img alt="Profile Picture" width = "120" height = "120" src='/Images/<%# Eval("Images")%>'/>
                        <br /> Name : 
                        <asp:Label ID="LBL_FirstName" runat="server" Text='<%# Eval("FirstName") %>' />
                        <br />Last Name : 
                        <asp:Label ID="LBL_LastName" runat="server" Text='<%# Eval("LastName") %>' />
                        <br />Date of Birth : 
                        <asp:Label ID="LBL_DateofBirth" runat="server" Text='<%# Eval("DateofBirth") %>' />
                        <br />Registeration Date : 
                        <asp:Label ID="LBL_RegisterationDate" runat="server" Text='<%# Eval("RegisterationDate") %>' />
                        <br /> Gender : 
                        <asp:Label ID="LBL_Gender" runat="server" Text='<%# Eval("Gender") %>' />
                        <br />
                    </td>
                </AlternatingItemTemplate>
                <EditItemTemplate>

                </EditItemTemplate>
                <EmptyDataTemplate>
                    <table id="Table1" runat="server" style="width: 100%">
                        <tr>
                            <td>
                                No data was returned.</td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <EmptyItemTemplate>
            
                </EmptyItemTemplate>
                <GroupTemplate>
                    <tr ID="itemPlaceholderContainer" runat="server">
                        <td ID="itemPlaceholder" runat="server">
                        </td>
                    </tr>
                </GroupTemplate>
                <InsertItemTemplate>

                </InsertItemTemplate>
                <ItemTemplate>
                    <td>
                        <img alt="Profile Picture" width = "120" height = "120" src='/Images/<%# Eval("Images")%>'/>
                        <br />First Name : 
                        <asp:Label ID="LBL_FirstName" runat="server" Text='<%# Eval("FirstName") %>' />
                        <br />Last Name : 
                        <asp:Label ID="LBL_LastName" runat="server" Text='<%# Eval("LastName") %>' />
                        <br />Date of Birth : 
                        <asp:Label ID="LBL_DateofBirth" runat="server" Text='<%# Eval("DateofBirth") %>' />
                        <br />Registeration Date : 
                        <asp:Label ID="LBL_RegisterationDate" runat="server" Text='<%# Eval("RegisterationDate") %>' />
                        <br /> Gender : 
                        <asp:Label ID="LBL_Gender" runat="server" Text='<%# Eval("Gender") %>' />
                        <br />
                    </td>
                </ItemTemplate>
                <LayoutTemplate>
                    <table id="Table2" runat="server">
                        <tr id="Tr1" runat="server">
                            <td id="Td5" runat="server">
                                <table ID="groupPlaceholderContainer" runat="server" border="0" style="">
                                    <tr ID="groupPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr id="Tr2" runat="server">
                            <td id="Td6" runat="server" style="">
                                <asp:DataPager ID="DataPager1" runat="server" PageSize="4">
                                    <Fields>
                                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                        <asp:NumericPagerField />
                                        <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />
                                    </Fields>
                                </asp:DataPager>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
                <SelectedItemTemplate>
                    <td>
                        <img alt="Profile Picture" width = "120" height = "120" src='/Images/<%# Eval("Images")%>'/>
                        <br />First Name : 
                        <asp:Label ID="LBL_FirstName" runat="server" Text='<%# Eval("FirstName") %>' />
                        <br />Last Name : 
                        <asp:Label ID="LBL_LastName" runat="server" Text='<%# Eval("LastName") %>' />
                        <br />Date of Birth : 
                        <asp:Label ID="LBL_DateofBirth" runat="server" Text='<%# Eval("DateofBirth") %>' />
                        <br />Registeration Date : 
                        <asp:Label ID="LBL_RegisterationDate" runat="server" Text='<%# Eval("RegisterationDate") %>' />
                        <br /> Gender : 
                        <asp:Label ID="LBL_Gender" runat="server" Text='<%# Eval("Gender") %>' />
                        <br />
                    </td>
                </SelectedItemTemplate>
            </asp:ListView>
    </p>
</center>
</asp:Content>
